//
//  LocationViewController.m
//  QRCodeManager
//
//  Created by Cosmin Stirbu on 4/17/13.
//  Copyright (c) 2013 Cosmin Stirbu. All rights reserved.
//

#import "LocationViewController.h"

@interface LocationViewController ()

@end

@implementation LocationViewController

@synthesize qrLocation;

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(qrLocation.latitude, qrLocation.longitude);
    MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(coordinate, 800, 800);
    [_mapView setRegion:[_mapView regionThatFits:region] animated:YES];
    
    // Add an annotation
    MKPointAnnotation *point = [[MKPointAnnotation alloc] init];
    point.coordinate = coordinate;
    
    [_mapView addAnnotation:point];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewDidUnload {
    _mapView = nil;
    [super viewDidUnload];
}
@end
